home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / tsbat146.zip / TEST33.BAT < prev    next >
DOS Batch File  |  1992-09-12  |  993b  |  29 lines

  1. echo off
  2.  
  3. rem This is a demonstration batch by Prof. Timo Salmi Sat 12-Sep-1992
  4.  
  5. rem It shows how to test within a batch files if the MsDos version
  6. rem is 3.3 or later. The reason for this demonstration is that you
  7. rem might wish to have differences in your batch depending on which
  8. rem MsDos version is available. For example the call command was not
  9. rem available until version 3.3.
  10.  
  11. rem If none of the 3.3, 4. or .5 is found then tmpfind.$$$ will be
  12. rem empty.
  13. ver | find "3.3" > tmpfind.$$$
  14. ver | find "4." >> tmpfind.$$$
  15. ver | find "5." >> tmpfind.$$$
  16.  
  17. rem If tmpfind.$$$ is empty (0 bytes) copying it will produce
  18. rem nothing.
  19. copy tmpfind.$$$ tmpfind1.$$$ > nul
  20. del tmpfind.$$$
  21.  
  22. rem We test whether tmpfind1$$$ exitst. Thus we are indirectly
  23. rem testing whether 3.3, 4. or .5 was found.
  24. if exist tmpfind1.$$$ echo MsDos version is at least 3.3
  25. if not exist tmpfind1.$$$ echo MsDos version is earlier than 3.3
  26.  
  27. if exist tmpfind1.$$$ del tmpfind1.$$$
  28. echo on
  29.